﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Utility
{
    public class CartItem
    {
        // khai bao contructor
        #region

        public CartItem()
        {
            this.ID = "";
            this.Name = "";
            this.Price = 0;
            this.Quantity = 0;
        }
        public CartItem(string id, string name, decimal price, int quantity)
        {
            this.ID = id;
            this.Name = name;
            this.Price = price;
            this.Quantity = quantity;
        }
        #endregion


        private string _id;

        public string ID
        {
            get { return _id; }
            set { _id = value; }
        }
        private string _name;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        private decimal _price;

        public decimal Price
        {
            get { return _price; }
            set { _price = value; }
        }
        private int _quantity;

        public int Quantity
        {
            get { return _quantity; }
            set { _quantity = value; }
        }

        public decimal Total
        {
            get { return _quantity * _price; }
        }


    }
}
